package com.yida.gwj.vote.outside.domain.request;

import com.yida.gwj.vote.outside.domain.vo.GwjVoteItemVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @author lqq
 * @date 2023-03-14
 */
@ApiModel("投票结果请求")
public class GwjVoteResultRequest implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty("投票结果ID")
	@NotNull(message = "请求参数有误[resultId]为空")
	private Long resultId;

	@ApiModelProperty("投票类型：0未投票、1网页投票、2短信投票、3公众号投票、4入户投票")
	private String voteType;

	@ApiModelProperty("投票项目ID")
	@NotNull(message = "请求参数有误[voteId]为空")
	private Long voteId;

	@Valid
	@ApiModelProperty("投票选项")
	@NotEmpty(message = "请选择表决项")
	private List<GwjVoteItemVo> voteItems;

	@NotEmpty(message = "请选择表决项")
	private List<GwjVoteResultDetailRequest> resultDetails;

	public Long getResultId() {
		return resultId;
	}

	public void setResultId(Long resultId) {
		this.resultId = resultId;
	}

	public String getVoteType() {
		return voteType;
	}

	public void setVoteType(String voteType) {
		this.voteType = voteType;
	}

	public Long getVoteId() {
		return voteId;
	}

	public void setVoteId(Long voteId) {
		this.voteId = voteId;
	}

	public List<GwjVoteItemVo> getVoteItems() {
		return voteItems;
	}

	public void setVoteItems(List<GwjVoteItemVo> voteItems) {
		this.voteItems = voteItems;
	}

	public List<GwjVoteResultDetailRequest> getResultDetails() {
		return resultDetails;
	}

	public void setResultDetails(List<GwjVoteResultDetailRequest> resultDetails) {
		this.resultDetails = resultDetails;
	}

	@Override
	public String toString() {
		final StringBuffer sb = new StringBuffer("GwjVoteResultRequest{");
		sb.append("resultId=").append(resultId);
		sb.append(", voteType='").append(voteType).append('\'');
		sb.append(", voteId=").append(voteId);
		sb.append(", voteItems=").append(voteItems);
		sb.append(", resultDetails=").append(resultDetails);
		sb.append('}');
		return sb.toString();
	}
}
